<html>
  <head>
    <style>
      del,
      ins {
        display: inline-block;
        padding: 0 0.2em;
      }
      ins {
        text-decoration: none;
        background-color: #d4fcbc;
      }
      a {
        color: inherit;
      }
      a ins {
        text-decoration: inherit;
      }
      del {
        text-decoration: line-through;
        background-color: #fbb6c2;
        color: #555;
      }
      html,
      body {
        font-family: 'Microsoft YaHei', 'Arial Narrow', sans-serif;
        height: 100%;
        margin: 0;
        width: 100%;
      }
      .fileTitle {
        margin-bottom: 0.1em;
        padding: 0.4em;
        font-size: 24px;
        background-color: darkgray;
      }
    </style>
  </head>
  <body></body>
  <script src="assert/WT.js"></script>
  <script src="assert/html-diff.js"></script>

  <script>
    let $ = WT.$
    let fileAddDel = ['filenameLink', 'A', 'filenameLink', 'D']
    let fileDiffArr = [
      'filenameLink1',
      `assertLog(
        JSON.stringify($.fake.checkIdCard.getInfo('610632270728731')),
        JSON.stringify({
        gender: '女',
        birthday: '1927-07-28',
        place: '陕西省,延安市,黄县'
      })) <br />
        asdf`,
      `assertLog(
        JSON.stringify($.fake.checkIdCard.getInfo('610632270728731')),
        JSON.stringify({ gender: '男', birthday: '1927-07-28', place:
        '陕西省,延安市,黄陵县' }) )
        <p>ddd</p>
        <p>asdfas</p>
        asdfasdf`,
      'filenameLink2',
      `<div id="docContent">
          <div class="content custom">
            <h1 id="小程序配置">
              <a href="#小程序配置" aria-hidden="true" class="header-anchor"
                >#</a
              >
              大程序配置
            </h1>
            <h2 id="全局配置">
              <a href="#全局配置" aria-hidden="true" class="header-anchor">#</a>
              全局配置
            </h2>
            <p>
              小程序根目录下的
              <code>app.json</code>
              文件用来对微信小程序进行全局配置，决定页面文件的路径、窗口表现、设置网络超时时间、设置多
              tab 等。
            </p>
            <p>
              完整配置项说明请参考<a
                href="./../reference/configuration/app.html"
                >小程序局部配置</a
              >
            </p>
            <p>以下是一个包含了部分常用配置选项的 <code>app.json</code> ：</p>
            <div class="language-json extra-class">
              <pre
                class="language-json"
              ><code><span class="token punctuation">{</span>
          <span class="token property">"pages"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
            <span class="token string">"pages/index/idx"</span><span class="token punctuation">,</span>
            <span class="token string">"pages/logs/index"</span>
          <span class="token punctuation">]</span><span class="token punctuation">,</span>
          <span class="token property">"window"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token property">"navigationBarTitleText"</span><span class="token operator">:</span> <span class="token string">"Demo"</span>
          <span class="token punctuation">}</span><span class="token punctuation">,</span>
          <span class="token property">"tabBar"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token property">"list"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span>
              <span class="token property">"pagePath"</span><span class="token operator">:</span> <span class="token string">"pages/index/index"</span><span class="token punctuation">,</span>
              <span class="token property">"text"</span><span class="token operator">:</span> <span class="token string">"首页"</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">{</span>
              <span class="token property">"pagePath"</span><span class="token operator">:</span> <span class="token string">"pages/logs/index"</span><span class="token punctuation">,</span>
              <span class="token property">"text"</span><span class="token operator">:</span> <span class="token string">"日志"</span>
            <span class="token punctuation">}</span><span class="token punctuation">]</span>
          <span class="token punctuation">}</span><span class="token punctuation">,</span>
          <span class="token property">"networkTimeout"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token property">"request"</span><span class="token operator">:</span> <span class="token number">10000</span><span class="token punctuation">,</span>
            <span class="token property">"downloadFile"</span><span class="token operator">:</span> <span class="token number">10000</span>
          <span class="token punctuation">}</span><span class="token punctuation">,</span>
          <span class="token property">"debug"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
          <span class="token property">"navigateToMiniProgramAppIdList"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
            <span class="token string">"wxe5f52902cf4de896"</span>
          <span class="token punctuation">]</span>
        <span class="token punctuation">}</span>
        </code></pre>
            </div>
            <p>
              完整配置项说明请参考<a
                href="./../reference/configuration/app.html"
                >小程序全局配置</a
              >
            </p>
            <h2 id="页面配置">
              <a href="#页面配置" aria-hidden="true" class="header-anchor">#</a>
              页面配置
            </h2>
            <p>
              每一个小程序页面也可以使用同名
              <code>.json</code>
              文件来对本页面的窗口表现进行配置，页面中配置项会覆盖
              <code>app.json</code> 的 <code>window</code> 中相同的配置项。
            </p>
            <p>
              完整配置项说明请参考<a
                href="./../reference/configuration/page.html"
                >小程序页面配置</a
              >
            </p>
            <p>例如：</p>
            <div class="language-json extra-class">
              <pre
                class="language-json"
              ><code><span class="token punctuation">{</span>
          <span class="token property">"navigationBarBackgroundColor"</span><span class="token operator">:</span> <span class="token string">"#ffffff"</span><span class="token punctuation">,</span>
          <span class="token property">"navigationBarTextStyle"</span><span class="token operator">:</span> <span class="token string">"black"</span><span class="token punctuation">,</span>
          <span class="token property">"navigationBarTitleText"</span><span class="token operator">:</span> <span class="token string">"微信接口功能演示"</span><span class="token punctuation">,</span>
          <span class="token property">"backgroundColor"</span><span class="token operator">:</span> <span class="token string">"#eeeeee"</span><span class="token punctuation">,</span>
          <span class="token property">"backgroundTextStyle"</span><span class="token operator">:</span> <span class="token string">"light"</span>
        <span class="token punctuation">}</span>
        </code></pre>
            </div>
          </div>
        </div>`,
      `<div id="docContent">
          <div class="content custom">
            <h1 id="小程序配置">
              <a href="#小程序配置" aria-hidden="true" class="header-anchor"
                >#</a
              >
              小程序配置
            </h1>
            <h2 id="全局配置">
              <a href="#全局配置" aria-hidden="true" class="header-anchor">#</a>
              全局配置
            </h2>
            <p>
              小程序根目录下的
              <code>app.json</code>
              文件用来对微信小程序进行全局配置，决定页面文件的路径、窗口表现、设置网络超时时间、设置多
              tab 等。
            </p>
            <p>
              完整配置项说明请参考<a
                href="./../reference/configuration/app.html"
                >小程序全局配置</a
              >
            </p>
            <p>以下是一个包含了部分常用配置选项的 <code>api.json</code> ：</p>
            <div class="language-json extra-class">
              <pre
                class="language-json"
              ><code><span class="token punctuation">{</span>
          <span class="token property">"pages"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
            <span class="token string">"pages/index/index"</span><span class="token punctuation">,</span>
            <span class="token string">"pages/logs/index"</span>
          <span class="token punctuation">]</span><span class="token punctuation">,</span>
          <span class="token property">"window"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token property">"navigationBarTitleText"</span><span class="token operator">:</span> <span class="token string">"Demo"</span>
          <span class="token punctuation">}</span><span class="token punctuation">,</span>
          <span class="token property">"tabBar"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token property">"list"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span>
              <span class="token property">"pagePath"</span><span class="token operator">:</span> <span class="token string">"pages/index/index"</span><span class="token punctuation">,</span>
              <span class="token property">"text"</span><span class="token operator">:</span> <span class="token string">"首页"</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">{</span>
              <span class="token property">"pagePath"</span><span class="token operator">:</span> <span class="token string">"pages/logs/index"</span><span class="token punctuation">,</span>
              <span class="token property">"text"</span><span class="token operator">:</span> <span class="token string">"日志"</span>
            <span class="token punctuation">}</span><span class="token punctuation">]</span>
          <span class="token punctuation">}</span><span class="token punctuation">,</span>
          <span class="token property">"networkTimeout"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token property">"request"</span><span class="token operator">:</span> <span class="token number">10000</span><span class="token punctuation">,</span>
            <span class="token property">"downloadFile"</span><span class="token operator">:</span> <span class="token number">10000</span>
          <span class="token punctuation">}</span><span class="token punctuation">,</span>
          <span class="token property">"debug"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
          <span class="token property">"navigateToMiniProgramAppIdList"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
            <span class="token string">"wxe5f52902cf4de896"</span>
          <span class="token punctuation">]</span>
        <span class="token punctuation">}</span>
        </code></pre>
            </div>
            <p>
              完整配置项说明请参考<a
                href="./../reference/configuration/app.html"
                >小程序全局配置</a
              >
            </p>
            <h2 id="页面配置">
              <a href="#页面配置" aria-hidden="true" class="header-anchor">#</a>
              页面配置
            </h2>
            <p>
              每一个小程序页面也可以使用同名
              <code>.json</code>
              文件来对本页面的窗口表现进行配置，页面中配置项会覆盖
              <code>app.json</code> 的 <code>window</code> 中相同的配置项。
            </p>
            <p>
              完整配置项说明请参考<a
                href="./../reference/configuration/page.html"
                >小程序页面配置</a
              >
            </p>
            <p>例如：</p>
            <div class="language-json extra-class">
              <pre
                class="language-json"
              ><code><span class="token punctuation">{</span>
          <span class="token property">"navigationBarBackgroundColor"</span><span class="token operator">:</span> <span class="token string">"#ffffff"</span><span class="token punctuation">,</span>
          <span class="token property">"navigationBarTextStyle"</span><span class="token operator">:</span> <span class="token string">"black"</span><span class="token punctuation">,</span>
          <span class="token property">"navigationBarTitleText"</span><span class="token operator">:</span> <span class="token string">"微信接口功能演示"</span><span class="token punctuation">,</span>
          <span class="token property">"backgroundColor"</span><span class="token operator">:</span> <span class="token string">"#eeeeee"</span><span class="token punctuation">,</span>
          <span class="token property">"backgroundTextStyle"</span><span class="token operator">:</span> <span class="token string">"light"</span>
        <span class="token punctuation">}</span>
        </code></pre>
            </div>
          </div>
        </div>`
    ]
    let fg = $Fg()
    for (let i = 0; i < fileDiffArr.length / 3; i++) {
      let elm = fg.adElm('', 'DIV')
      elm
        .adElm('', 'DIV')
        .cn('fileTitle')
        .h(`<a href="${fileDiffArr[i * 3]}">修改 ${fileDiffArr[i * 3]}</a>`)
      elm
        .adElm('', 'DIV')
        .h(htmlDiff(fileDiffArr[i * 3 + 1], fileDiffArr[i * 3 + 2]))
    }
    for (let i = 0; i < fileAddDel.length / 2; i++) {
      let elm = fg.adElm('', 'DIV')
      elm
        .adElm('', 'DIV')
        .cn('fileTitle')
        .h(
          `<a href="${fileAddDel[i * 2]}">${(fileAddDel[i * 2 + 1] === 'A'
            ? '增加 '
            : '删除 ') + fileAddDel[i * 2]}</a>`
        )
    }
    $DB.append(fg)
  </script>
</html>
